package com.zt.location.modules.business.message;

import com.zt.location.common.utils.SysCache;
import com.zt.location.modules.base.entity.RfidinfoEntity;

public class TaskData{ 
	
	private String tagCode; 
	
	private String readerID;
	
	private String readerIP; 
	
	private String tagType;
	
	private String tagFlag;
	
	private String param1;
	
	private String param2;
	
	private String addTime; 
	
	private int titleNo;
	
	private int titleStartNo;
	
	private int titleEndNo;
	
	private int direction; //1前进 2 后退 
	
	private String currentState;
	
	private int status;

	//private Integer[] titleRang = new Integer[2]; 

	public String getTagCode() {
		return tagCode;
	}
	

	public void setTagCode(String tagCode) {
		this.tagCode = tagCode;
		try{
			this.titleNo=((RfidinfoEntity)SysCache.getObject("rfid_"+this.tagCode)).getPos();
	        int zeroLocation = titleNo-5; 
	       /* for (int i = 0; i < titleRang.length; i++) {
	        	titleRang[i]=zeroLocation+i<0?0:zeroLocation+i; 
			}*/
	        int num=0;
	        if(zeroLocation<0){
	        	num=Math.abs(zeroLocation);
	        }
	        titleStartNo=num>0?0:zeroLocation;
	        titleEndNo=num>0?titleNo-num+5:titleNo-0+5;
		}catch(Exception e){
			
		}
		
	}
	

	public String getReaderID() {
		return readerID;
	}
	

	public void setReaderID(String readerID) {
		this.readerID = readerID;
	}
	

	public String getReaderIP() {
		return readerIP;
	}
	

	public void setReaderIP(String readerIP) {
		this.readerIP = readerIP;
	}
	

	public String getTagType() {
		return tagType;
	}
	

	public void setTagType(String tagType) {
		this.tagType = tagType;
	}
	

	public String getTagFlag() {
		return tagFlag;
	}
	

	public void setTagFlag(String tagFlag) {
		this.tagFlag = tagFlag;
	}
	

	public String getParam1() {
		return param1;
	}
	

	public void setParam1(String param1) {
		this.param1 = param1;
	}
	

	public String getParam2() {
		return param2;
	}
	

	public void setParam2(String param2) {
		this.param2 = param2;
	}
	

	public String getAddTime() {
		return addTime;
	}
	

	public void setAddTime(String addTime) {
		this.addTime = addTime;
	}
	

	public int getTitleNo() {
		return titleNo;
	}
	

	public void setTitleNo(int titleNo) {
		this.titleNo = titleNo;
	}
	

	public int getTitleStartNo() {
		return titleStartNo;
	}
	

	public void setTitleStartNo(int titleStartNo) {
		this.titleStartNo = titleStartNo;
	}
	

	public int getTitleEndNo() {
		return titleEndNo;
	}
	

	public void setTitleEndNo(int titleEndNo) {
		this.titleEndNo = titleEndNo;
	}
	

	//public Integer[] getTitleRang() {
	//	return titleRang;
	//}
	

	//public void setTitleRang(Integer[] titleRang) {
	//	this.titleRang = titleRang;
	//}


	public int getDirection() {
		return direction;
	}
	


	public void setDirection(int direction) {
		this.direction = direction;
	}


	public String getCurrentState() {
		return currentState;
	}
	


	public void setCurrentState(String currentState) {
		this.currentState = currentState;
	}


	public int getStatus() {
		return status;
	}
	


	public void setStatus(int status) {
		this.status = status;
	}
	 
	
	
	
}
